/* *****************************************************************************************************
 * Copyright 2009. Dbwebx Group
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 * *****************************************************************************************************
 */

package org.dbwebx.service.dao;

import java.util.List;

import org.dbwebx.domain.Bundle;

/**
 * The service interface for {@link Bundle} entities management.
 * 
 * @author Izzet_Mustafayev
 */
public interface BundleService {
	/**
	 * Lists available {@link Bundle}s from persistence storage.
	 * 
	 * @return the {@link Bundle} list
	 */
	List<Bundle> list();

	/**
	 * Persists {@link Bundle} to the persistence storage.
	 * 
	 * @param bundle
	 *            the {@link Bundle} to persist
	 * @return persisted bundle
	 */
	Bundle persist(Bundle bundle);

	/**
	 * Loads {@link Bundle} by given bundle identity
	 * 
	 * @param bundleId
	 *            the {@link Bundle} identity to load
	 * @return found {@link Bundle}
	 */
	Bundle load(Long bundleId);

	/**
	 * Searches {@link Bundle} by given name.
	 * 
	 * @param bundleName
	 *            the {@link Bundle} name to find with
	 * @return found {@link Bundle}
	 */
	Bundle find(String bundleName);

	boolean remove(String bundle);
}
